﻿@model DocProcessingWorkflow.Models.JobsAdmin.CreateStockViewModel
@{
  Layout = null;
}

@using (Html.BeginForm(null, null, FormMethod.Post, new { id = "__AjaxAntiForgeryForm", @class = "form-horizontal" }))
{
  @Html.AntiForgeryToken()

  <div class="row">
    <div class="form-horizontal col-md-12">
      <div id="message">
        @TempData["message"]
      </div>

      @Html.HiddenFor(model => model.StockType)

      <div class="form-group">
        @Html.LabelFor(model => model.Code, new { @class = "control-label col-md-1" })
        <div class="col-md-11">
          @if(Model.CodesAreRestricted)
          {
          @Html.DropDownListFor(model => model.Code, new SelectList(@Model.AvailableCodes), new { @class = "form-control" })
          }
          else
          {
          @Html.EditorFor(model => model.Code, new { htmlAttributes = new { @class = "form-control" } })
          }
        </div>
      </div>
      <div class="form-group">
        @Html.LabelFor(model => model.Description, new { @class = "control-label col-md-1" })
        <div class="col-md-11">
          @Html.EditorFor(model => model.Description, new { htmlAttributes = new { @class = "form-control" } })
        </div>
      </div>
      <div class="form-group">
        @Html.LabelFor(model => model.Weight, new { @class = "control-label col-md-1" })
        <div class="col-md-11">
          @Html.EditorFor(model => model.Weight, new { htmlAttributes = new { @class = "form-control" } })
        </div>
      </div>
      <div class="form-group">
        @Html.LabelFor(model => model.SizeX, new { @class = "control-label col-md-1" })
        <div class="col-md-11">
          @Html.EditorFor(model => model.SizeX, new { htmlAttributes = new { @class = "form-control" } })
        </div>
      </div>
      <div class="form-group">
        @Html.LabelFor(model => model.Facing, new { @class = "control-label col-md-1" })
        <div class="col-md-11">
          @Html.EditorFor(model => model.Facing, new { htmlAttributes = new { @class = "form-control" } })
        </div>
      </div>
      <div class="form-group">
        @Html.LabelFor(model => model.Colour, new { @class = "control-label col-md-1" })
        <div class="col-md-11">
          @Html.EditorFor(model => model.Colour, new { htmlAttributes = new { @class = "form-control" } })
        </div>
      </div>
      <a id="createStock" class="btn btn-page pull-right"><span>Create Stock</span></a>
    </div>
  </div>
}
